<h1>Listing carts</h1>
<table>
    <tr>
        <th></th>
        <th></th>
        <th></th>
    </tr>
    <% @carts.each do |cart| %>
    <tr>
        <td><%= cart.id%></td>
        <td><%= link_to 'Show', cart %></td>
        <td><%= link_to 'Edit', edit_cart_path(cart) %></td>
        <td><%= link_to 'Destroy', cart, confirm: 'Are you sure?', method: :delete %></td>
    </tr>
    <tr><td colspan="4">Total Price:<%= number_to_currency cart.total_price%></td></tr>
    <% end %>
</table>
<br />
<%= link_to 'New Cart', new_cart_path %> 